﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;

namespace ZooSystem
{

    public class Animal
    {
        public AnimalType type;
        public bool   hibernate, 
                      venomous;
        public Status status;
        public double coordinateX,
                      coordinateY;
        public string kind, 
                      size, 
                      foodPreferences, 
                      activity, 
                      placeOfLive,
                      color, 
                      scientificName, 
                      feature, 
                      movement, 
                      sound;
        

        public Animal() { }

        public override string ToString()
        {
            return scientificName;
        }

        public string GetAnimalInfo()
        {
            string data = "";
            data += scientificName == "" ? "" : ("Scientific Name: " + scientificName + "\n");
            data += "Type: " + type.ToString() + "\n";
            data += kind == "" ? "" : ("Kind: " + kind + "\n");
            data += size == "" ? "" : ("Size: " + size + "\n");
            data += foodPreferences == "" ? "" : ("Food Preferences: " + foodPreferences + "\n");
            data += activity == "" ? "" : ("Activity: " + activity + "\n ");
            data += placeOfLive == "" ? "" : ("Place of leave: " + placeOfLive + "\n");
            data += color == "" ? "" : ("Colore: " + color + "\n ");
            data += feature == "" ? "" : ("Feature: " + feature + "\n");
            data += movement == "" ? "" : ("Movement: " + movement + "\n");
            data += !hibernate ? "" : "Hibernate\n";
            data += !venomous ? "" : "Venomous\n";

            data += "Status: " + status + "\n";
            data += "Coordninates {" + coordinateX + ", " + coordinateY + "}\n";
            return data;
        }

        public void ChangeLocation()
        { 
            coordinateX = new Random().NextDouble() * 100;
            coordinateY = new Random().NextDouble() * 73.36541;
        }
    }
}
